package org.charmsoft;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IORuntimeException;
import cn.hutool.setting.dialect.Props;
import org.charmsoft.generator.ExcelToArtifactGenerator;
import org.charmsoft.generator.Generator;

import java.io.File;

public class Main {
    public static void main(String[] args) {
        Props props = new Props("Template.properties");
        String path = (String) props.getProperty("path");

        try {
            File[] files = FileUtil.ls(path);
            Generator generator = new ExcelToArtifactGenerator(files);
            generator.generate();
        } catch (IORuntimeException ex){
            ex.printStackTrace();
        }
    }
}